<%--
  Created by IntelliJ IDEA.
  User: Efim Matytsin
  Date: 22.02.15
  Time: 12:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"  language="java" %>
<%@ include file="../../resources/templates/material/header.jsp" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<div class="container">
    <div class="section">
        <h5>Вход</h5>
        <p>Все поля язвляются обязательными к заполнению!</p>
        <div class="row">
            <form:form class="col s12" action="/login" commandName="loginData" method="post">
                <div class="row">
                    <div class="input-field col s6">
                        <form:input path="username" id="username" type="text" name="username" value="${loginData.username}" class="validate"></form:input>
                        <form:errors path="username" cssClass="error" element="div" />
                        <label for="username">Логин</label>
                    </div>
                    <div class="input-field col s6">
                        <form:input path="password" id="password" type="text" name="password" value="${loginData.password}" class="validate"></form:input>
                        <form:errors path="password" cssClass="error" element="div" />
                        <label for="password">Пароль</label>
                    </div>
                </div>

                <div class="row">
                    <button class="btn waves-effect waves-light" type="submit" name="action">Войти
                        <i class="mdi-content-send right"></i>
                    </button>
                </div>
            </form:form>
        </div>
    </div>
</div>

<%@ include file="../../resources/templates/material/footer.jsp" %>